package com.dmx.fw.service.interfaces;

import java.util.List;
import java.util.Map;

import com.dmx.fw.bean.mapping.pojo.Operator;

public interface OperatorService extends Service {

	/**
	 * 根据operator id取得角色列表
	 * 
	 * @param operatorId
	 * @return
	 */
	public List getRolesById(Long operatorId);
	
	/**
	 * 获得非菜单的授权信息
	 * @param operatorId
	 * @return
	 */
	public Map getAuthFuncByOptrId(Long operatorId);

	/**
	 * 根据登录名取得操作员
	 * 
	 * @param loginName
	 * @return
	 */
	public Operator getOperator(String loginName);

	public void saveOperator(Operator operator) throws Exception;

	/**
	 * @param operatorId
	 */
	public void removeOperator(Long operatorId);

	/**
	 * 删除操作员
	 * 
	 * @param operator
	 */
	public void removeOperator(Operator operator);

	/**
	 * @param operatorId
	 * @return
	 */
	public List getFuncsByOptrId(Long operatorId);

	/**
	 * 添加操作员
	 * 
	 * @param operator
	 * @param roleArray
	 *            已选取角色数组
	 */
	public void save(Operator operator, String[] roleArray);

	/**
	 * 修改操作员
	 * 
	 * @param operator
	 * @param roleArray
	 */
	public void update(Operator operator, String[] roleArray);

	/**
	 * 修改密码
	 * 
	 * @param operator
	 */
	public void changePsw(Operator operator);

	/**
	 * @param optrId
	 * @return
	 */
	public Operator getOperator(Long optrId);

	/**
	 * 检查登录名是否重复
	 * 
	 * @param login
	 * @return
	 */
	public boolean checkLoginNameUnique(String login);

	public List getOperatorType();

	public List getAllRolesArray();

	public String getOperatorTypeName(String code);
}
